<template>
	<view class="page">
		<web-view :src="url"></web-view>
	</view>
</template>

<script>
	import {
		mapGetters
	} from 'vuex';
	export default {
		computed: {
			...mapGetters({
				imgUrl: 'common/cdnurl',
				system: 'common/system',
			})
		},
		data() {
			return {
				url: '',
				share_title: '',
				share_img: '',
			};
		},
		onLoad: function(options) {
			this.utils.hideShare()
			var that = this;
			if (options.url) {
				this.url = options.url;
			} else {
				this.url = uni.getStorageSync('webview_url');
			}
			this.url = decodeURIComponent(this.url);

		},
		onShareAppMessage: function() {
			return {
				title: this.system.share_title,
				imageUrl: this.imgUrl + this.system.share_img,
				path: '/pages/webview/webview?url=' + that.url,
				success: function(res) {}
			};
		},
		methods: {}
	};
</script>
<style>
	.page {
		background-color: #f2f2f2;
	}

	web-view {
		width: 100vh;
		height: 100vh;
	}
</style>
